<template>
    <div>
        <div class="i-layout-page-header">
            <PageHeader title="基本信息" hidden-breadcrumb />
        </div>
        <Card :bordered="false" dis-hover class="ivu-mt i-table-no-border">
           <DescriptionList title="基本信息" :col="1"  v-for="item in data">
               <Description term="员工姓名：">{{item.users[0].nickName}}</Description>
<!--               <Description term="所属部门：">{{item.dept.deptName}}</Description>-->
               <Description term="今日完成内容：">{{item.workDown}}</Description>
               <Description term="未完成工作">{{item.workLeft}}</Description>
               <Description term="备注">{{item.workRemark}}</Description>
               <Description term="上报时间：">{{item.reportTime}}</Description>
           </DescriptionList>
            <Divider />
        </Card>
    </div>
</template>
<script>
    import worksReport from "@/api/worksReport";
    export default {
        data () {
            return {
                data:[]
            }
        },
        created() {
            this.getDataDetail();
        },
        methods:{
            getDataDetail(){
                worksReport.findByPage({
                    workId:this.$route.query.workId
                })
                    .then(res => {
                        // 返回数据
                        this.data = res;
                    })
                    .catch(err => {
                        // 异常情况
                    })

            }
        }
    }
</script>
